#ifndef __MAIN__HPP
#define __MAIN__HPP

#include <opencv2/core.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/video.hpp>
#include <opencv2/videoio.hpp>
#include <deque>
#include <vector>
#include <string>
#include <iostream>
#include <thread>
#include <cstdlib>
#include "misc_processing.hpp"
#include "heartrate.hpp"
#include "spo2.hpp"
#include "face_detection.hpp"
#include "gui.hpp"

// 包装函数，用于多线程计算
void compute();

// 包装函数，用于多线程计算
template <typename IT>
void compute_hr(double &dest, IT begin, IT end, double fps);

// 包装函数，用于多线程计算
template <typename IT>
void compute_spo2();

// 包装函数，用于多线程计算
template <typename IT>
void compute_hr(double &dest, IT begin, IT end, double fps) {
    dest = get_heart_rate(begin, end, fps);
}

// 包装函数，用于多线程计算
template <typename IT>
void compute_spo2(double &dest, IT begin, IT end) {
    dest = get_spo2(begin, end);
}

#endif // __MAIN__HPP